{
    var arr=[1,2,3];
    var a,
        b,
        c;
    a=arr[0]
    b=arr[1]
    c=arr[2]
}

{
    let arr=[10,20,30];
    let [a,b,c]=arr;
    console.log(a,b,c);
}

{
    let [a,b,c]=[1,2];
    console.log(a,b,c);
}
{
    const [a,b,c]=[1,2];
    console.log(a,b,c);

}
{
    let [foo,[[bar],baz]]=[1,[[2],3]];
    console.log(foo,bar,baz);
}
{
    let [a,b]=[1,2,3];
    console.log(a,b);
}
{
    //let [num]=1;
    //let [num]=null;
    //let [num]=undefined;
    // let [num]={
    //     num:1,
    //     str:'2'
    // };

}
{
    let [a=true]=[];
    console.log(a);
}

{
    let [a,b,...c]=[1,2,3,4,5,6,7,8];
    console.log(a,b,c);
    c.push("aaaa");
    console.log(c);

}